package com.expdatacloud.service.impl;

import com.expdatacloud.entity.DecideWay;
import com.expdatacloud.entity.IqcDetectionHistory;
import com.expdatacloud.entity.ModelsMgt;
import com.expdatacloud.mapper.IqcDetectionHistoryMapper;
import com.expdatacloud.mapper.IqcDetectionMapper;
import com.expdatacloud.service.IqcDetectionHistoryService;
import com.expdatacloud.vo.SuppliedMaterialsDailyVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * IQC检测履历表 服务实现类
 * </p>
 *
 * @author jie
 * @since 2019-11-20
 */
@Service
public class IqcDetectionHistoryServiceImpl  implements IqcDetectionHistoryService {

    @Autowired
    private IqcDetectionHistoryMapper iqcDetectionHistoryMapper;
    @Autowired
    private IqcDetectionMapper iqcDetectionMapper;

    @Override
    public List<IqcDetectionHistory> list(IqcDetectionHistory iqcDetectionHistory) {
        return iqcDetectionHistoryMapper.list(iqcDetectionHistory);
    }

    @Override
    public int insert(IqcDetectionHistory iqcDetectionHistory) {
        return iqcDetectionHistoryMapper.insert(iqcDetectionHistory);
    }

    @Override
    public List<String> getShipperList() {
        return iqcDetectionHistoryMapper.getShipperList();
    }

    @Override
    public List<ModelsMgt> getModelKeyList(String shipper) {
        return iqcDetectionHistoryMapper.getModelKeyList(shipper);
    }

    @Override
    public List<DecideWay> getDecideWay() {
        return iqcDetectionMapper.getDecideWay("YES");
    }

    @Override
    public void updateHistory(SuppliedMaterialsDailyVo suppliedMaterialsDailyVo) {
        iqcDetectionMapper.updateHistory(suppliedMaterialsDailyVo);
    }
}
